package cn.isjinhao.se.sql.grammar.statement.retrieve.represention;

import cn.isjinhao.se.sql.grammar.CurdStatementVisitor;
import cn.isjinhao.se.sql.grammar.statement.Binary;
import cn.isjinhao.se.sql.grammar.CurdStatement;
import cn.isjinhao.se.sql.lexical.token.Token;

/**
 * 顶层的 select 语法表示：singleSelect (("union" | "minus" | "intersect" | "except") singleSelect)*
 *
 * @author 01395265
 * @date 2021/3/2
 */
public class Select extends Binary {

    public Select(CurdStatement leftCurdStatement, Token token, CurdStatement rightCurdStatement) {
        super(leftCurdStatement, token, rightCurdStatement);
    }

    public Select(CurdStatement left) {
        super(left, null, null);
    }

    @Override
    public <R> R accept(CurdStatementVisitor<R> curdStatementVisitor) {
        return curdStatementVisitor.visitSelect(this);
    }

}
